function models = classificator()
%CLASSIFICATOR reads all training data and classifies it
    
    words = {'left', 'right', 'stop', 'go' };
    models = [hmm('left', 4), hmm('right', 4), hmm('stop', 3), hmm('go', 4)];
    for i = 1:4
        word = words(i);
        display(['Learning the word:', word]);
        
         path = 'soundfile-wav/';
    
        soundSignals = cell(26, 1); 
        
        display('Concatenate the signals to one file');
        for fileIndex = 0:25
            fname = char(strcat(path, word, '_', num2str(fileIndex),'.wav'));
            [soundSignals{fileIndex+1}, Fs, ~, ~] = wavread(fname);
        end
        
        featureFile = cell2mat(soundSignals);
               
        display('encoding the signal');
        encodedSignal = encode(featureFile, Fs);
        models(i).trainModel(encodedSignal); 
    end
end